|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.apache.mina.util.ExpiringMap.Expirer
public class ExpiringMap.Expirer
A Thread that monitors an ExpiringMap and will remove
elements that have passed the threshold.
| Constructor Summary | |
|---|---|
ExpiringMap.Expirer()
Creates a new instance of Expirer. |
|
| Method Summary | |
|---|---|
int |
getExpirationInterval()
Get the interval in which an object will live in the map before it is removed. |
int |
getTimeToLive()
Returns the Time-to-live value. |
boolean |
isRunning()
Checks to see if the thread is running |
void |
run()
|
void |
setExpirationInterval(long expirationInterval)
Set the interval in which an object will live in the map before it is removed. |
void |
setTimeToLive(long timeToLive)
Update the value for the time-to-live |
void |
startExpiring()
Kick off this thread which will look for old objects and remove them. |
void |
startExpiringIfNotStarted()
If this thread has not started, then start it. |
void |
stopExpiring()
Stop the thread from monitoring the map. |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public ExpiringMap.Expirer()
| Method Detail |
|---|
public void run()
run in interface Runnablepublic void startExpiring()
public void startExpiringIfNotStarted()
public void stopExpiring()
public boolean isRunning()
public int getTimeToLive()
public void setTimeToLive(long timeToLive)
timeToLive - The time-to-live (seconds)public int getExpirationInterval()
public void setExpirationInterval(long expirationInterval)
expirationInterval - The time in seconds
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||